<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>新建关注时回复</title>
<%@include file="../collect/meta.jsp"%>
<link rel="stylesheet" href="${ctx }/css/radius.css" type="text/css"></link>
<link rel="stylesheet" href="css/subcribeReply.css" type="text/css"></link>
<script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
</head>
<body lang="zh-cn">
	<div class="wrapper">
		<c:import url="/collect/top.jsp"></c:import>
		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<c:import url="/collect/left.jsp"></c:import>
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i>微信管理</li>
							<li>自动回复管理</li>
							<li><a href="reply!watchSubscribeReply">设置关注时回复</a>
							</li>
							<li>新增关注时回复</li>
						</ul>
						<!-- .breadcrumb -->
					</div>
					<div class="page-content">
						<div class="row">
							<div class="col-xs-12">
								<div class="alert alert-success">
									用户关注您的微信公众号时，系统自动回复的文本信息。例如公司介绍，欢迎致辞等。</div>
								<!-- PAGE CONTENT BEGINS -->
								<form action="reply!addSubscribeReply" name="addReply"
									method="post">
									<div align="center">
										<div class="text">
											<div class="replycont">
												<label>回复内容:&nbsp;</label>
												<textarea cols="30" id="txt" rows="8" name="reply.content"></textarea>
											</div>
											<div id="showWords"></div>
										</div>
										<!-- <div align="left" id="two"></div> -->
										<div id="btn-team">
											<input type="button" class="btn btn-primary radius" id="but"
												value="添加" />
										</div>
									</div>
								</form>
								<!-- PAGE CONTENT ENDS -->
							</div>
							<!-- /.col -->
						</div>
						<!-- /.row -->
					</div>
					<!-- /.page-content -->
				</div>
				<!-- /.main-content -->
			</div>
			<!-- /.main-container-inner -->
			<a href="#" id="btn-scroll-up"
				class="btn-scroll-up btn btn-sm btn-inverse"
				style="position:fixed;bottom:0;"> <i
				class="icon-double-angle-up icon-only bigger-110"></i> </a>
		</div>
		<!-- /.main-container -->
		<div class="push"></div>
	</div>
	<c:import url="/collect/down.jsp"></c:import>
	<script type="text/javascript" src="${ctx}/js/limitTextarea.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#but").click(function(){
				var txt = $("#txt").val();
				var iNum=Math.ceil(getLength(txt)/2);//这里统计的是字符数
				if (iNum==0) {
					alert("请完善以上信息！");
					return false;
				}
				else if(iNum>140){
					alert("字数超过限制");
				}
				else{
					$("form[name='addReply']").submit();
				}
			});
			
			$('.weixinguanli > ul').show();
			$('.autoanswer > ul').show();
			$('.autoanswer > ul > li > a').eq(1).css("color","red");
		});
	</script>
</body>
</html>